//
//  CustomTool.h
//  JFTwxsd
//
//  Created by Steven on 2018/9/14.
//  Copyright © 2018年 junfeiweiyejiaoyujituan. All rights reserved.
//

#import <Foundation/Foundation.h>

//适配新款手机
static inline BOOL isIPhoneX(){
    
    BOOL iPhoneX = NO;
    if (UIDevice.currentDevice.userInterfaceIdiom != UIUserInterfaceIdiomPhone) {
        return iPhoneX;
    }
    if (@available(iOS 11.0, *)) {
        UIWindow *mainWindow = [UIApplication sharedApplication].delegate.window;
        if (mainWindow.safeAreaInsets.bottom > 0.0) {
            iPhoneX = YES;
        }
    }
    return iPhoneX;
}

//iPhone XR：828px x 1792px
//iPhone XS Max: 1242px x 2688px

@interface UIScrollView (Refresh)
- (void)pullRefresh:(dispatch_block_t)block;
- (void)downRefresh:(dispatch_block_t)block;
@end

typedef NS_ENUM(NSUInteger, DIR) {
    Left,
    Right
};



@interface UITextField (Icon)
- (void)setIconwithDir:(DIR)dir icon:(UIImage *)icon;
@end

@interface NSBundle (Version)
@property(nonatomic, copy, readonly)NSString *shortVersion;
@property(nonatomic,copy, readonly)NSString *version;
@end



#import "EXTConcreteProtocol.h"
#import "UIScrollView+EmptyDataSet.h"


@protocol Empty <NSObject, DZNEmptyDataSetSource, DZNEmptyDataSetDelegate>
@concrete
- (void)setDelegate:(UIScrollView *)scrollView;
@end


#pragma mark - 空数据显示
@interface UIViewController (Empty) <Empty>
@end

#pragma mark - stroyBoardName
@interface UIViewController (storyBoardName)
@property(nonatomic, copy, class, readonly)NSString *storyboardName;
@end

#pragma mark - LoadNibName
@interface UIView (LoadNibName)

@property (readonly, class, nonatomic) UIView *nibView;
@property (readonly, class, nonatomic) NSString *nibName;

@end

#pragma mark - 导航栏下的线隐藏
@interface UIView (HiddenLine)
@property(nonatomic, strong)UIImageView *navBarHairlineImageView;
@end


#pragma mark - 行间距和字间距
@interface UILabel (ChangeLineSpaceAndWordSpace)
//行间距
- (void)changeLineSpace:(float)space;
//字间距
- (void)changeWordSpace:(float)space;

//同时改变行间距和字间距
- (void)changeLineSpace:(float)lineSpace wordSapce:(float)wordSpace;
@end

/**
 按钮倒计时
 */

@interface UIButton (CountDown)

- (void)coutDown:(NSInteger)time;

@end


















